home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97b.txt / 000070_icon-group-sender _Thu Sep 18 08:14:52 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id IAA25545
  4.     for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Thu, 18 Sep 1997 08:14:51 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA05089; Thu, 18 Sep 1997 08:14:50 -0700
  7. Date: Tue, 16 Sep 1997 23:11:15 GMT
  8. From: ia@stryx.demon.co.uk (Iain Alexander)
  9. Reply-To: ia@stryx.demon.co.uk
  10. Message-Id: <25954@stryx.demon.co.uk>
  11. To: icon-group@cs.arizona.edu
  12. Subject: Re: Problem with Program
  13. X-Mailer: PCElm 1.10
  14. Lines: 45
  15. Errors-To: icon-group-errors@cs.arizona.edu
  16. Status: RO
  17.  
  18. In message <Stuart.Robinson-1609972256580001@asianstmg-221.anu.edu.au> Stuart.Robinson@anu.edu.au (Stuart Robinson) writes:
  19. > I just wrote up a little program to check each line of text for the number
  20. > of times the string "#PL" appears.  I want the program to put the line in
  21. > list_1 if the string shows up once, in list_2 if the string shows up
  22. > twice, in list_3 if the string show up three times, and in list_other if
  23. > it fails to show up at all or shows up more than three times.  The problem
  24. > is, it doesn't work.  What gives?  Thanks in advance.
  25. > ==========
  26. > #16 Sept 1997
  27. > #program written to print all clauses in which plurality is multiply marked
  28. > procedure main()
  29. > list_1 := []
  30. > list_2 := []
  31. > list_3 := []
  32. > otherlist_other := []
  33. > chars := &letters++-#7
  34. > count := 0
  35. >  
  36. > while line := read() do    
  37. >    {
  38.  
  39. try
  40.      count:= 0
  41.  
  42. >    line ?
  43. >       {           
  44. >       while tab(upto(chars)) do
  45. >          {
  46. >          word := tab(many(chars))
  47. >          word ?
  48. >             {
  49. >             if find("#PL") then count +:= 1
  50. >             {
  51. >          }
  52. >       }
  53. [etc. snipped]
  54. -- 
  55. Iain Alexander               PGP 1024-bit key id B501A0AD
  56. ia@stryx.demon.co.uk   I.Alexander@bsn0106.wins.icl.co.uk
  57.